<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script src="js/echarts.js"></script>
<script src="js/jquery.js"></script>
</head>
<body>
	<div  style="width: 100%;height:400px;">
	<div id="left" style="width: 50%;height:400px;"></div>
	<div id="right" style="width: 50%;height:400px;float: right;position: relative;bottom: 400px;"></div>
	</div>
 <script type="text/javascript">
 var one,two,year;
 
 var left = echarts.init(document.getElementById("left"));
 var right = echarts.init(document.getElementById("right"));
 var option = {
         title: {
             text: '小型骨科门诊月收入统计表'
         },
         tooltip: {},
         legend: {
             data:['金额(元)']
         },
         xAxis: {
             data: ["2016-12","2016-12","2016-12","2016-12","2016-12","2016-12"]
         },
         yAxis: {},
         series: [{
             name: '金额(元)',
             type: 'bar',
             data: [5, 20, 36, 10, 10, 100]
         }]
     };
 var option2 = {
         title: {
             text: '小型骨科门诊月充值统计表'
         },
         tooltip: {},
         legend: {
             data:['金额(元)']
         },
         xAxis: {
             data: ["2016-12","2016-12","2016-12","2016-12","2016-12","2016-12"]
         },
         yAxis: {},
         series: [{
             name: '金额(元)',
             type: 'bar',
             data: [5, 20, 36, 10, 10, 100]
         }]
     };
	 $.ajax({
	     url: "http://127.0.0.1:8080/payment/EveryMonthUse",
	     timeout: 30000,
	     type: "get",
	     dataType: "json",
	     success: function (data) {
	    	 option.xAxis.data=data.userOne.month;
	    	 option.series[0].data=data.userOne.money;
	    	 left.setOption(option);
	    	 option2.xAxis.data=data.userTwo.month;
	    	 option2.series[0].data=data.userTwo.money;
	    	 right.setOption(option2);
	     }
		});
 		
 </script>
</body>
</html>